You are an AI assistant that aids users in performing data analysis using Python and Pandas to find information. 
 
There is the data  
You have the data melbourne_housing contains the following columns: ['Suburb', 'Address', 'Rooms', 'Type', 'Price', 'Method', 'SellerG', 'Date', 'Distance', 'Postcode', 'Bedroom2', 'Bathroom', 'Car', 'Landsize', 'BuildingArea', 'YearBuilt', 'CouncilArea', 'Lattitude', 'Longtitude', 'Regionname', 'Propertycount'].
--- The description for each column this data is:
Suburb: Name of the suburb where the property is located (Abbotsford, Airport West, Albert Park ...etc)
Address: Street address of the property (85 Turner St, 25 Bloomburg St, 5 Charles St ...etc)
Rooms: The number of rooms in the property
Type: Type of property (h: house, u: unit/apartment, t: townhouse)
Price: Sale price of the property (measured in dollars)
Method: Method of sale (S: Sold (property successfully sold), SP: Sold Prior (sold before auction), PI: Passed In (not sold at auction), VB: Vendor Bid (seller made a bid), and SA: Sold After (sold after auction))
SellerG: Name of the real estate agent or agency that facilitated the sale
Date: Date when the property sale was finalized (day/month/year)
Distance: Distance of the property from a significant central point (measured in kilometers)
Postcode: Postal code area of the property
Bedroom2: The number of bedrooms in the property
Bathroom: The number of bathrooms in the property
Car: The number of car parking spaces available with the property
Landsize: Size of the land on which the property is situated (measured in square meters)
BuildingArea: Size of the building itself (measured in square meters) 
YearBuilt: Year in which the property was constructed
CouncilArea: Local government area in which the property is located (Yarra, Moonee Valley, Port Phillip ...etc)
Latitude: Geographical latitude of the property
Longitude: Geographical longitude of the property
Regionname: Larger region or area that the property is part of (Northern Metropolitan, Western Metropolita, Southern Metropolitan ...etc)
Propertycount: The total number of properties in the suburb
---
Considering contents from the dataset and result types from user, you only need to generate codes and notations. 
Conversation begins:
[USER (data scientist)]: Hey Tapilot, I've got this "melbourne_housing" dataset, and I'm trying to figure out how many properties are in the affordable range of $300,000 to $600,000. Can you help me filter it down? Please generate and display a DataFrame to filter and visualize affordable housing options from the 'melbourne_housing' dataset, where the price range is between 300,000 and 600,000.

[YOU (AI assistant)]: Absolutely! Let's start by filtering the dataset based on that price range. Here's the code for that :
'''
import pandas as pd   
import pickle

# Load the dataset
melbourne_housing = pd.read_csv("melb_data.csv")

affordable_housing = melbourne_housing[(melbourne_housing['Price'] >= 300000) & (melbourne_housing['Price'] <= 600000)]

print(affordable_housing)

'''

[USER (data scientist)]: Awesome, that's what I needed. now can you help me find the number of properties in this filtered dataset? Please load the 'melb_data.csv' dataset into a DataFrame and calculate the number of properties in it, storing the result as an integer in a pickle file.

[YOU (AI assistant)]: Sure thing! You can use this code to count the number of properties in the filtered dataset :
'''
import pandas as pd   
import pickle

# Load the dataset
melbourne_housing = pd.read_csv("melb_data.csv")

number_of_properties = len(affordable_housing)

print(number_of_properties)

'''

[USER (data scientist)]: Hey, I've got this dataset called "affordable_housing" and I'm trying to figure out the top 10 suburbs and regions with the most affordable properties sold. Can you help me out with the code? Please generate two lists from the 'melbourne_housing' DataFrame to identify the top 10 most common suburbs and regions, then save these lists using pickle for future reference.

My template of code snippet is:

---BEGIN CODE TEMPLATE---

import matplotlib.pyplot as plt
import pandas as pd
import pickle

melbourne_housing = pd.read_csv("melb_data.csv") 

# YOUR SOLUTION BEGIN:
<code1>
[GENERATE YOUR CODE]
</code1>
# YOUR SOLUTION END:

print(top_suburbs_list)

# save data
pickle.dump(top_suburbs_list,open("./pred_result/top_suburbs_list.pkl","wb"))

print(top_regions_list)

# save data
pickle.dump(top_regions_list,open("./pred_result/top_regions_list.pkl","wb"))

---END CODE TEMPLATE---

Please note that you have to generate the WHOLE python code instead of code segments based on the code snippet using Pandas library 2.0.3 version and Matplotlib library 3.7.4 version. You must keep all comments in code snippet unchanged.

[YOU (AI assistant)]: Of course! Let's start by finding the top 10 suburbs and regions based on the number of affordable properties sold. We can use the value_counts() method to count how many times each unique value appears in the 'Suburb' and 'Regionname' columns. Here's what you can do: 
